Hit Chance
Hit chance is the probability that an attack using hit chance hits. Regular hits will inflict damage. Main formula This is the general formula: hit chance = skill - defense With: skill = skill * skill multiplier defense = defense * defense multiplier Skill and Defense refer to either Melee or Ranged Skill and Defense. See their respective sections in this article to calculate values. Defense is subject to diminishing returns. Additionally, being surrounded can decrease Melee Defense. Defense diminishing returns Defense has diminishing returns over 50. Each point over this threshold will only give half value for the purpose of calculating hit chance: if defense > 50, then defense = 50 + (defense - 50) * 0.5 Surrounding Surrounding occurs when two or more enemies are adjacent to an ally. Each enemy above the first reduces the defense of the surrounded unit making it easier for everyone to hit it. melee defense = melee defense - surround bonus * (adjacent enemies - 1) Height level difference If the attacker is on a tile that's more elevated than his target's a +10% bonus to hit chance is granted. If the attacker is on a tile that is below his target's a −10% penalty to hit chance per level difference is applied. Skills ignoring shields Some skills ignore the defense bonus granted by shields. Shieldwall is unaffected. hit chance = hit chance + shield defense With Shield Expert, shield defense = shield defense * 1.25. Line of fire The line of fire for ranged attacks can be obstructed by obstacles. Some hinder sight completely making it impossible to select the target they hide. Others just make it more difficult to reach a blocked target. In that case a red arrow blocked by a shield is displayed over the obstacle. The base hit chance penalty to reach a blocked target is 75%. The Bullseye Perk reduces it to 50% (* 0.66). If this fails the shot goes astray. One among the intended target obstacles is randomly chosen and targeted instead. If the shot goes astray a −15% penalty to hit chance is applied. Attacks made over allies at a range of 2 tiles are not blocked. Distance The hit chance for some skills is modified with distance (in tiles). At distance = 1 (adjacent), hit chance is unmodified. hit chance = hit chance + (distance to target - 1) * hit chance per tile modifier Hit chance range Hit chance for regular attacks cannot be lower than 5% and cannot go higher than 95%. hit chance = max(5, min(95, hit chance)) Auto hit Utility skills will always hit. hit chance = 100 Hit roll The hit roll is a random number between 1 and 100. If it is lower than the hit chance the attack hits. hit roll = rand(1, 100) hit = hit roll <= hit chance Combat difficulty If beginner combat difficulty has been selected all hit rolls are modified in favor of the player making it easier for the player to hit enemies and harder for enemies to hit the player. player hit roll = hit roll - 5 enemy hit roll = hit roll +5 Reroll If the target is hit and has the Lucky Trait the hit roll is rolled again (once). Scatter Projectiles that miss a target (intended or not) at a distance > 2 tiles can scatter and hit adjacent targets. For attackers other than the player the chance is 25% but no ally must be adjacent to the target. For those attackers as well as player controlled units either one of these additional conditions must be met: * the skill ignores shields * the target has no shield * hit roll > hit chance + (shield + shieldwall bonus) * 2 So even if the target has a shield there's a chance for the projectile to scatter. The shield and Shiedwall bonus take into account Shield Expert. A scattered shot hits as normal but it cannot go astray or scatter again. Critical hit If a target is hit a roll is made to determine what body part is hit. If the head is hit the hit is a critical hit and will do additional damage. critical hit chance = chance to hit head * chance to hit head multiplier Defense Defense helps avoid hits. Melee Defense protects against melee attacks while Ranged Defense protects against ranged attacks. Defense is affected by many variables. Modifiers specific to a type are listed under 'Melee' or 'Ranged' sections. Enemies, backgrounds and levels will not be studied here. See the relevant articles. Trait Melee Ranged Perk Melee Ranged Item Skill Effect Ranged Injury Event Melee Ranged Defense Multiplier Trait Perk Morale Effect Injury Melee Terrain Skill (accuracy) Skill increases chance to hit. Melee skill targets melee defense while ranged skill targets ranged defense. Skill is affected by many variables. Modifiers specific to a type are listed under 'Melee' or 'Ranged' sections. Enemies, backgrounds and levels will not be studied here. See the relevant articles. Trait Melee Ranged Perk Melee Skill Melee Ranged Effect Injury Event Melee Ranged Skill (accuracy) multiplier Trait Perk Morale Effect Ranged Injury Ranged Terrain Melee Category:Gameplay Category:Gameplay mechanics